<!--
 * @Author: CNN 969682281@qq.com
 * @Date: 2024-01-17 10:46:24
 * @LastEditors: 贺楠 1071780426@qq.com
 * @LastEditTime: 2024-11-01 14:02:55
 * @FilePath: \zdgy\zdgy\src\components\sampleManage\fieldSampling\index.vue
 * @Description: 这是默认设置,请设置`customMade`, 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
-->
<template>
  <div
    class="rawMaterial"
    id="tableInfoBox"
    style=" display: flex;
    flex-direction: column;!important"
  >
    <FormLyout
      @yj_saveForm="yj_saveForm"
      :isSave="isSave"
      :changeBtn="changeBtn"
      :typeData="typeData"
      @changeType="changeType"
    >
      <template v-slot:formcon>
        <div class="baseTable" v-show="typeData[0].show">
          <publicForm
            ref="publicForm"
            lableWidth="100px"
            :formObj="formObj"
            :formData="formData"
            :selected="selected"
            @changeRadio="changeRadio"
            @selectChange="selectChange"
            @inputFocus="inputFocus"
            @handleNodeClick="handleNode"
            @clickDialog="clickDialog"
            fileType="0"
            :timestamp="formData.fPhotofile"
            :timestamp1="formData.fSourcefile"
            :fileList="fileList"
            :fileList1="fSourcefileList"
            @delteFile="delteFile($event, 0)"
          >
          </publicForm>
        </div>

        <div class="baseTable" v-show="typeData[1].show && displaySwitching != 0">
          <publicForm1
            ref="publicForm1"
            lableWidth="100px"
            :formObj="formObjAccept"
            :formData="formDataAccept"
            @selectChange="selectChange"
            @inputFocus="inputFocus"
            @clickDialog="clickDialog"
          >
          </publicForm1>
        </div>
      </template>
    </FormLyout>

    <!-- 材料进场编号 -->
    <el-dialog
      width="1060px"
      title="材料进场编号选择"
      
      :visible.sync="dialogEditVisible_cl"
      :append-to-body="true"
      top="5%"
    >
      <div
        class="dialogBody searchdd common commonClassDialog moduleDialog"
        id="longLable "
        :style="{ height: dialogHeight }"
        style="width: 100%"
      >
        <div
          style="
            width: 100%;
            margin-bottom: 20px;
            height: calc(100% - 42px);
            display: flex;
            flex-direction: column;
            overflow: auto !important;
          "
        >
        <div class="search">   <publicForm2
              ref="publicForm9"
              @yj_searchForm="yj_searchForm_cl"
              lableWidth="110px"
              :formObj="searchObj"
              :formData="getList_cl"
              :status="0"
            >
            </publicForm2></div>
     
          <!-- <div class="leftTree" v-if="treelength">
            <tree
              style="height: 100%"
              :treeData="treeData"
              :checkData="checkData"
              nodeKey="fCompanyid"
              @getTreeInfo="handleNodeClickTree"
              :defaultProps="defaultProps"
            >
            </tree>
          </div>
          <div class="rightCon">
            <tableData
              :page="getList_cl.page"
              :pageSize="getList_cl.pageSize"
              :height="navigatepageNums_cl > 1 ? 'calc(100% - 50px)' : '100%'"
              :config="table_config_cl"
              :dataList="tableData_cl"
              :loading="loading"
              :info="queryCriteriaData_cl"
              :total="queryCriteriaData_cl.total"
              :pageNum.sync="getList_cl.page"
              :limit.sync="getList_cl.pageSize"
              @click-change="rowChange_cl"
              @ClickOnLine="yj_viewForm_cl"
              @pagination="yj_searchForm_cl(getList_cl)"
            />
          </div> -->

          <!-- <TableLyout>
            <template v-slot:tabcom>
              <div class="tableInfo"> -->
          <tableData
            :page="getList_cl.page"
            :pageSize="getList_cl.pageSize"
            :stripe="false"
            height="100%"
            :config="table_config_cl"
            :dataList="tableData_cl"
            :loading="loading"
            :info="queryCriteriaData_cl"
            :total="queryCriteriaData_cl.total"
            :pageNum.sync="getList_cl.page"
            :limit.sync="getList_cl.pageSize"
            @click-change="rowChange_cl"
            @pagination="yj_searchForm_cl(getList_cl)"
            @ClickOnLine="yj_viewForm_cl"
          />
          <!-- </div>
            </template>
          </TableLyout> -->
        </div>
        <div class="newlyAdded_btn" v-if="btnShow">
          <el-button
            :disabled="isLock"
            type="primary"
            @click="yj_saveForm_cl()"
          >
            保存
          </el-button>
          <el-button type="warning" @click="dialogEditVisible_cl = false"
            >关闭</el-button
          >
        </div>
      </div>
    </el-dialog>
    <!-- 材料进场编号 -->

    <!-- WBS -->
    <custom-dialog
      @refreshList="refreshList"
      :currentRow="materialRow"
      v-if="materialShow"
      :dialogVisible="materialShow"
      @close1="materialDialog"
      @getWBS="getWBS"
    ></custom-dialog>
    <!-- WBS -->

    <!-- 根据组织机构树选人 -->
    <el-dialog
      width="1060px"
      title="根据组织机构树选人"

      :visible.sync="dialogEditVisibleTree"
      :append-to-body="true"
      top="5%"
    >
      <div
        class="dialogBody common commonClassDialog moduleDialog"
        id="longLable"
        :style="{ height: dialogHeight }"
        style="width: 100%"
      >
        <div style="margin-bottom: 45px; height: 100%">
          <div
            class="publicForm addMemberCheckBox"
            style="height: calc(100% - 40px); overflow-y: auto; width: 100%"
          >
            <div class="addMemberCheckTree">
              <div class="companyBox">
                <el-tree
                  :data="companyInfo"
                  :props="defaultProps"
                  @node-click="selectCompany"
                  :highlight-current="highlightBd"
                ></el-tree>
              </div>
              <div class="departmentBox">
                <div
                  class="departmentTitle"
                  v-for="(item, index) in departmentList"
                  :key="index"
                  @click="seletDepartment(item, index)"
                >
                  <a
                    href="javascript:;"
                    :class="num === item.fDepartmentId ? 'activetext' : ''"
                    :title="item.fShortName"
                  >
                    {{ item.fShortName }}</a
                  >
                </div>
              </div>
            </div>

            <div class="addMemberCheckLeft">
              <el-radio-group
                v-model="checkboxGroup1"
                @change="selectRealname($event, personList)"
              >
                <el-radio-button
                  v-for="item in personList"
                  :label="item.fUserid"
                  :key="item.fUserid"
                  :value="item.fRealname"
                >
                  <div class="addMemberCheck">
                    <div class="MemberIcon">
                      <img :src="item.fGender == 0 ? girls : boys" alt="" />
                    </div>
                    <div class="MemberDetailInfos">
                      <div class="name">{{ item.fRealname }}</div>
                      <div class="hostName">{{ item.fDepartmentName }}</div>
                      <div class="hostName">{{ item.fAccount }}</div>
                    </div>
                  </div>
                </el-radio-button>
              </el-radio-group>
            </div>
          </div>
        </div>
      </div>
      <div class="newlyAdded_btn" v-if="btnShow">
        <el-button type="primary" @click="submitMember()">保存</el-button>
        <el-button type="warning" @click="dialogEditVisibleTree = false"
          >关闭</el-button
        >
      </div>
    </el-dialog>
    <!-- 根据组织机构树选人 -->
  </div>
</template>

<script src="./index.js"></script>
<style lang="less" scoped>
@import "./index.less";
</style>